﻿<%@ page language="java" import="java.util.*,java.text.DecimalFormat" pageEncoding="UTF-8" %>
<%@page import="com.util.PublicToolCheckParam" %>
<%@page import="com.entity.OrderGoodsInfo" %>
<%@page import="com.dao.GoodsInfoDAO" %>
<%@page import="com.entity.GoodsInfo" %>
<%@page import="com.entity.OrderDetailInfo" %>
<%@page import="com.entity.ServiceAssessment" %>


<%
    String orderId = (String) request.getAttribute("orderId");
%>


<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<%
    String email = (String) session.getAttribute("email");
    String thirdemail = (String) session.getAttribute("thirdemail");
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<base href="<%=basePath%>">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7">
    <title>填写信息</title>
    <meta content="" name="keywords">
    <meta content="" name="description">
    <link href="css/common.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="./js/base.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>
    <script type="text/javascript" src="js/time.js"></script>
    <script type="text/javascript" src="js/lb.js"></script>
      <script type="text/javascript" src="js/web/orderinfo.js" charset="utf-8"></script>
    <script type="text/javascript">
        function checkLogin() {
            if ("<%=email%>" == "" || "<%=email%>" == "null") {
                alert("请先登陆!");
                return false;
            }
            else {
                top.location.href = "servlet/DoMethod?method=showMyInformation";
                return true;
            }
        }
        function checkUserLogin() {
            if ("<%=email%>" == "" || "<%=email%>" == "null") {
                alert("请先登陆!");
                return false;
            }
            else {
                top.location.href = "servlet/DoChatMethod?method=login";
                return true;
            }
        }
    </script>

    <!---reload-!-->
</head>
<body style="background:transparent url(images/bg.jpg) repeat scroll 0% 0%" onload="times()">
<div id="contain">

    <!-- 头 -->

    <jsp:include page="../web/top.jsp" flush="true"/>


    <!-- 头 -->


    <!-- 第二部分内容 -->
    <div class="box" style=" margin-top:1px;   background: url(images/pbg.gif);">
        <div class="left">
            <jsp:include page="../web/left.jsp" flush="true"/>

        </div>
        <div class="right">
            <div class="boxtitlebg mbnav"><a href="">首页</a> &gt; 就诊详情</div>

            <!--内容-->
            <div style="padding:10px">


                <table align="center" width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#cccccc" style="font-size:13px;">
                    <tr bgcolor="#CCFFFF">
                        <td height="25" colspan="2">
                            <div align="center">就诊信息</div>
                        </td>
                        <td width="101">
                            <div align="center">挂号费用</div>
                        </td>
                    </tr>
                    <%
                        ArrayList<OrderGoodsInfo> orderList = (ArrayList<OrderGoodsInfo>) request.getAttribute("orderList");
                        DecimalFormat df = new DecimalFormat("0.00");
                        GoodsInfoDAO gdao = new GoodsInfoDAO();
                        double sumFee = 0;
                        for (int i = 0; i < orderList.size(); i++) {
                            OrderGoodsInfo orderInfo = orderList.get(i);
                            int goodsId = orderInfo.getGoodsId();
                            GoodsInfo goodsInfo = gdao.getQueryGoodsInfo(goodsId);

                            //String price = df.format(goodsInfo.getPrice());
                            out.println("<tr>");
                            if (PublicToolCheckParam.checkNullAndEmpty(goodsInfo.getPhoto())) {
                                out.println("<td style='border-right:none'><img src='" + goodsInfo.getPhoto() + "' width='50' height='50'/></td>");
                            } else {
                                out.println("<td style='border-right:none' width='50' height='50'/><div align='center'><font color='#FF6699'>暂无</font></div></td>");
                            }
                            out.println("<td width='400' style='border-left:none'>" + goodsInfo.getGoodsName() + "</td>");
                            out.println("<td><div align='center'>" + goodsInfo.getPrice() + "元</div></td>");
                            out.println("</tr>");
                        }
                    %>
                </table>
                <table height="82" style="font-size:13px; " align="center">


                    <%
                        ArrayList<ServiceAssessment> serviceAssessmentList = (ArrayList<ServiceAssessment>) request.getAttribute("serviceAssessmentList");

                        out.println("<tr><td height='40' style='padding-left:20px'><font color='#666666'><strong> 留言评价记录：</strong></font></td></tr>");
                        if (serviceAssessmentList.size() == 0) {
                            out.println("<tr><td style='padding-left:40px' colspan='2'><div id='serviceAssessmentTable'>暂无数据!</div></td></tr>");
                        } else {
                            out.print("<tr><td style='padding-left:40px' colspan='2'><div id='serviceAssessmentTable'>");

                            for (int i = 0; i < serviceAssessmentList.size(); i++) {
                                ServiceAssessment assessmentInfo = serviceAssessmentList.get(i);
                                out.print("" + assessmentInfo.getAssessmentTime() + "&nbsp;&nbsp;&nbsp;&nbsp;您留言评价道：&nbsp;&nbsp;" + assessmentInfo.getServiceAssessment() + "<br/><br/>");
                            }
                            out.println("</div></td></tr>");
                        }
                        out.println("<tr><td height='40' style='padding-left:20px' colspan='2'><font color='#666666'><strong>留言评价：</strong></font></td></tr>");
                        out.println("<tr><td style='padding-left:40px' colspan='2'><textarea id='serviceAssessment' name='serviceAssessment' style='width:500px;height:100px'></textarea></td></tr>");
                        out.println("<tr><td style='padding-left:40px' colspan='2'><input type='button' value='提交留言评价' style='height: 30px;padding-top: 3px' onclick='return sendRequest(" + orderId + ")'/></td></tr>");
                     %>


                </table>

            </div>
            <!--内容-->
        </div>
    </div>
    <!-- 第二部分内容 -->

    <!--底部-->

    <jsp:include page="../web/bottom.jsp" flush="true"/>
</div>
</body>
</html>





